package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author 褚金龙
 * @Date 2024/10/6 10:42
 */
@Mapper
public interface OrderDetailMapper {
    /**
     * 批量插入订单明细
     * @param orderDetailList
     */
    void insertBatch(List<OrderDetail> orderDetailList);


    /**
     * 按订单id查询详情
     * @param id
     * @return
     */
    @Select("select *from order_detail where order_id=#{id}")
    List<OrderDetail> select(Integer id);


    /**
     * 批量查询订单详情
     * @param ids
     * @return
     */
    List<OrderDetail> selectAll(List<Long> ids);
}
